﻿using YNTK.Common.Const;
using YNTK.Common.Entity;
using SqlSugar;
using System;

namespace YNTK.Message.Entitys
{
    /// <summary>
    /// 消息接收
    /// 版 本：V1.0.0
    /// 版 权：云南通科科技有限公司（https://www.yntkkj.com）
    /// 作 者：李仕鹏
    /// 日 期：2022-11-09
    /// </summary>
    [SugarTable("base_messagereceive")]
    [Tenant(ClaimConst.TENANT_ID)]
    public class MessageReceiveEntity : EntityBase<string>
    {
        /// <summary>
        /// 是否为接收人
        /// </summary>
        [SugarColumn(ColumnName = "F_IsReceive", ColumnDescription = "是否为接收人", ColumnDataType = "bit")]
        public bool IsReceive { get; set; }

        /// <summary>
        /// 消息id
        /// </summary>
        [SugarColumn(ColumnName = "F_MESSAGEID")]
        public string MessageId { get; set; }

        /// <summary>
        /// 所属组织id
        /// </summary>
        [SugarColumn(ColumnName = "F_OrganizeId", ColumnDescription = "所属组织id", ColumnDataType = "nvarchar(50)")]
        public string OrganizeId { get; set; }

        /// <summary>
        /// 所属机构id
        /// </summary>
        [SugarColumn(ColumnName = "F_MechanismId", ColumnDescription = "所属机构id", ColumnDataType = "nvarchar(50)")]
        public string MechanismId { get; set; }

        /// <summary>
        /// 消息类型(0.平台公告 1.通知公告 2.系统消息 3.私信消息)
        /// </summary>
        [SugarColumn(ColumnName = "F_Type", ColumnDescription = "消息类型(0.平台公告 1.通知公告 2.系统消息 3.私信消息)")]
        public int? Type { get; set; }

        /// <summary>
        /// 通知公告接收对象类型(0.所有人 1.本机构 2.指定人员 3.特定机构)
        /// </summary>
        [SugarColumn(ColumnName = "F_Notice", ColumnDescription = "通知公告类型(0.所有人 1.本机构 2.指定人员 3.特定机构)")]
        public int? Notice { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        [SugarColumn(ColumnName = "F_Title", ColumnDescription = "标题")]
        public string Title { get; set; }

        /// <summary>
        /// 接收用户id
        /// </summary>
        [SugarColumn(ColumnName = "F_USERID")]
        public string UserId { get; set; }

        /// <summary>
        /// 发送用户id
        /// </summary>
        [SugarColumn(ColumnName = "F_SendUserId")]
        public string SendUserId { get; set; }

        /// <summary>
        /// 是否阅读
        /// </summary>
        [SugarColumn(ColumnName = "F_IsRead", ColumnDescription = "是否阅读", ColumnDataType = "bit")]
        public bool IsRead { get; set; }

        /// <summary>
        /// 阅读时间
        /// </summary>
        [SugarColumn(ColumnName = "F_READTIME")]
        public DateTime? ReadTime { get; set; }

        /// <summary>
        /// 阅读次数
        /// </summary>
        [SugarColumn(ColumnName = "F_ReadCount")]
        public int? ReadCount { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "F_CreatorTime", ColumnDescription = "创建时间")]
        public DateTime? CreatorTime { get; set; }
    }
}
